-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Versioning the retail react app #1209
Conversation
* resolve package lock errors * clean console logs and code * more cleanup, remove duplicate items in overrideregex * upgrade minimatch version, match all file extensions, match with no file extension
…e/template-extensibility * feature/template-extensibility-stress-test: fix some problems with final cleanup Remove all console logs / cleanup / unnecessary code fix dependency dupes add missing pwa-kit packages more fixes for out of sync package / lockfiles Add back missing `scripts` in package.json after bad merge Add missing template files fix bad upstream merge changes add the whole `template-retail-react-app` under `app` dir to stress test performance with high number of file overrides Fix `pwa-kit-dev` paths that didn't know about `overrides` in build pipeline # Conflicts: # packages/_stress-test-project/build/loadable-stats.json # packages/commerce-sdk-react/package-lock.json # packages/internal-lib-build/package-lock.json # packages/pwa-kit-create-app/package-lock.json # packages/pwa-kit-dev/package-lock.json # packages/pwa-kit-dev/src/configs/webpack/config.js # packages/pwa-kit-dev/src/configs/webpack/plugins.js # packages/pwa-kit-react-sdk/package-lock.json # packages/pwa-kit-runtime/package-lock.json # packages/spike-extendend-retail-app/build/loadable-stats.json # packages/spike-extendend-retail-app/package-lock.json # packages/spike-extendend-retail-app/package.json # packages/template-retail-react-app/package-lock.json # packages/template-typescript-minimal/package-lock.json
…template extensibility, but `<path>/dir/non-index-name.(js|jsx|etc)` was not
…/ project components
…educe conditional logic execution
This reverts commit 7f3c364.
scripts/bump-version.js
Outdated
// TODO: is it possible to _not_ trigger the lifecycle scripts? See CHANGELOG.md | ||
setPackageVersion(oldVersion, {cwd: location}) | ||
setPackageVersion('prerelease', {cwd: location}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a bug currently with the changelog file in commerce-sdk-react. Because the package has its own version, it will run into this code block, which will cause more headings to be added in the changelog file.
I'm thinking let's fix this bug in another PR, since it's not a blocker and the changelog can be manually fixed by hand.
Re-iterating the known PR check issue from #1205 (comment)
|
scripts/pwa-kit-deps-version.js
Outdated
@@ -0,0 +1,58 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Can we rename this file to bump-pwa-kit-deps-version
? It is longer but give you a bit of a context what it does
scripts/independent-pkg-version.js
Outdated
@@ -0,0 +1,47 @@ | |||
#!/usr/bin/env node |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Can we rename this file as bump-independent-pkg-version.js
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, we can put these three scripts for version bumping into a separate folder
@@ -0,0 +1,79 @@ | |||
#!/usr/bin/env node |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This script is no longer in use. Should we remove it?
To get us ready to version the retail-react-app (or any other package in the monorepo) with its own independent version, this PR implements all of the scripts necessary to support the new release process.
Related spike PR #1167
Remaining tasks:
How to Test-Drive This PR
I've been testing the PR by going through the following scenarios: releasing the SDK, commerce-sdk-react, and then the retail-react-app. To thoroughly test them, please run a local npm registry first:
cd packages/pwa-kit-create-app node scripts/run-local-npm.js
Releasing SDK v3.0.0
cd <monorepo root>
npm run bump-version -- 3.0.0-preview.0
npm run bump-version -- 3.0.0
Switching to the publishing step. Now imagine that we have pushed our changes to GitHub and CI would take care of the publishing to npm.
branchName
torelease-3.0.x
.npm run publish-to-npm
Switching to the clean-up steps:
npm run bump-version -- 3.1.0-dev
to prepare for the next minor release.Releasing commerce-sdk-react v1.0.0
cd <monorepo root>
npm run bump-version:commerce-sdk-react -- 1.0.0-preview.0
npm run bump-version:commerce-sdk-react -- 1.0.0
Switching to the publishing step. Now imagine that we have pushed our changes to GitHub and CI would take care of the publishing to npm.
branchName
torelease-commerce-sdk-react-1.0.x
.npm run publish-to-npm
Switching to the clean-up steps:
npm run bump-version:commerce-sdk-react -- 1.1.0-dev
to prepare for the next minor release.Releasing retail-react-app v1.0.0
These steps are pretty much the same as releasing the previous commerce-sdk-react.
cd <monorepo root>
npm run bump-version:retail-react-app -- 1.0.0-preview.0
npm run bump-version:retail-react-app -- 1.0.0
Switching to the publishing step. Now imagine that we have pushed our changes to GitHub and CI would take care of the publishing to npm.
branchName
torelease-retail-react-app-1.0.x
.npm run publish-to-npm
Switching to the clean-up steps:
npm run bump-version:retail-react-app -- 1.1.0-dev
to prepare for the next minor release.Checklists
General
Accessibility Compliance
You must check off all items in one of the follow two lists:
or...
Localization